﻿using QxFramework.Core;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class StartUI : UIBase
{
    private Button _startButton;
    private Button _endButton;

    public AudioClip _stateAudio;

    private void Start()
    {
    }

    public override void OnDisplay(object args)
    {
        base.OnDisplay(args);
        CollectObject();
        OnRegisterHandler();
    }

    new public void CollectObject()
    {
        base.CollectObject();
        _startButton = Get<Button>("StartButton");
        _endButton = Get<Button>("EndButton");
    }

    protected override void OnRegisterHandler()
    {
        base.OnRegisterHandler();
    }

    protected override void OnClose()
    {
        base.OnClose();

    }

    public void StartGame()
    {
        ProcedureManager.Instance.ChangeTo<GameProcedure>();
        AudioControl.Instance.PlaySound("Mail",8);
    }

    public void ExitGame()
    {
        ProcedureManager.Instance.ChangeTo<ExitProcedure>();
    }
}
